package com.sgcc.sx.pmos.common.utils;

import android.text.Html;
import android.widget.TextView;

public class HtmlTextUtils {

    public static void onSuccess(String string, TextView textView) {
        CharSequence charSequence;
        // 这个是自定义的ImageGetter
//        DetailImageGetter detailImageGetter = new DetailImageGetter(this,textView);
        //因为fromHtml在api24开始过时，所以加上版本判断
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
            charSequence = Html.fromHtml(string, Html.FROM_HTML_MODE_LEGACY);
        } else {
            charSequence = Html.fromHtml(string);
        }
        textView.setText(charSequence);
    }



}
